/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package batchjob;

/**
 *
 * @author jonesbr
 */
public class Employee implements IMonthlyItem {
    private String firstName;
    private String lastName;
    private double paymentAmount;
    private String bankName;
    private String routingTransit;
    private String account;

    @Override
    public void process(String data) {
        String[] employeeInfo = data.split(" ");
        setFirstName(employeeInfo[0]);
        setLastName(employeeInfo[1]);
        String strPaymentAmount = employeeInfo[2];
        setPaymentAmount(Double.parseDouble(strPaymentAmount));
        setBankName(employeeInfo[3]);
        setRoutingTransit(employeeInfo[4]);
        setAccount(employeeInfo[5]);
    }

    @Override
    public String toString() {
        return "Employee: " + firstName + " " + lastName + " Payment Amount: " + paymentAmount;
    }

    
    
    /**
     * @return the firstName
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     * @param firstName the firstName to set
     */
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    /**
     * @return the lastName
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * @param lastName the lastName to set
     */
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    /**
     * @return the paymentAmount
     */
    public double getPaymentAmount() {
        return paymentAmount;
    }

    /**
     * @param paymentAmount the paymentAmount to set
     */
    public void setPaymentAmount(double paymentAmount) {
        this.paymentAmount = paymentAmount;
    }

    /**
     * @return the bankName
     */
    public String getBankName() {
        return bankName;
    }

    /**
     * @param bankName the bankName to set
     */
    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    /**
     * @return the routingTransit
     */
    public String getRoutingTransit() {
        return routingTransit;
    }

    /**
     * @param routingTransit the routingTransit to set
     */
    public void setRoutingTransit(String routingTransit) {
        this.routingTransit = routingTransit;
    }

    /**
     * @return the account
     */
    public String getAccount() {
        return account;
    }

    /**
     * @param account the account to set
     */
    public void setAccount(String account) {
        this.account = account;
    }
    
}
